/**
 * 熊猫直播间初始化
 * @param page
 * @param sleep
 * @returns {Promise<void>}
 */
module.exports = async ({page, sleep}) => {
    await page.addStyleTag({
        content: `
        .player-chest-login,
        .player-chest-levelup
            {display: none !important;}
            
        .leftmenu-s-bigbox
            {z-index: 0 !important;}
        `
    });
    await sleep(5000);
    await page.evaluate(() => {

        //收起左边栏
        const $leftSide = document.querySelector('div.leftmenu-l-bigbox');
        if ($leftSide.className.indexOf('hidden') === -1)
            document.querySelector('#leftmenu-close').click();
    });
};